 #!/bin/bash
#变量定义
PROJECTNAME="fullstack_solution"
USERNAME="jianglinjie"
PASSWORD="910104"
GIT_COMMIT_ID=`git rev-parse --short HEAD`
TAG=${USERNAME}/${npm_package_name}:${npm_package_version}-local-${GIT_COMMIT_ID}
DOCKER_FILE_PATH="./deploy/local/Dockerfile"
DOCKER_COMPOSE_YML="./deploy/local/docker-compose.yml"
REDIS_SERVER_NAME=${PROJECTNAME}-redis

#build
npm run build 

#构建镜像
docker build -f ${DOCKER_FILE_PATH} -t ${TAG} .

# docker-compose -f ${DOCKER_COMPOSE_YML} -p ${PROJECTNAME} up -d --remove-orphans

# docker run --name ${REDIS_SERVER_NAME} -d redis:latest redis-server --appendonly yes